//
//  idVC.m
//  EquiriesProject
//
//  Created by qianfeng on 15/10/31.
//  Copyright (c) 2015年 HXH. All rights reserved.
//

#import "idVC.h"
#import "ideaOne.h"
#import "ideaTwo.h"

@interface idVC ()

@end

@implementation idVC

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.view.backgroundColor = [UIColor colorWithRed:0.9 green:0.9 blue:0.9 alpha:1];
    
    [self createNav];
    [self createScroll];
}

//活动条
-(void)createScroll
{
    CGRect frame = CGRectMake(0, 64, self.view.frame.size.width, self.view.frame.size.height);
    NSArray * array = @[[ideaOne new],[ideaTwo new]];
    NSArray * nameArray = @[@"意见反馈",@"常见问题"];
    self.scroll = [XLScrollViewer scrollWithFrame:frame withViews:array withButtonNames:nameArray withThreeAnimation:222];
    self.scroll.xl_topBackColor = [UIColor whiteColor];
    self.scroll.xl_sliderColor = [UIColor redColor];
    self.scroll.xl_sliderHeight = 2;
    self.scroll.xl_buttonColorNormal = [UIColor grayColor];
    self.scroll.xl_buttonColorSelected = [UIColor redColor];
    self.scroll.xl_topHeight = 40;
    self.scroll.xl_buttonFont = 18;
    self.scroll.xl_buttonToSlider = 10;
    [self.view addSubview:self.scroll];
}


-(void)createNav
{
    UILabel * label = [[UILabel alloc]initWithFrame:CGRectMake(0, 0, 120, 40)];
    label.text = @"意见反馈";
    label.textAlignment = NSTextAlignmentCenter;
    label.textColor = [UIColor whiteColor];
    label.font = [UIFont systemFontOfSize:22];
    [self.view addSubview:label];
    self.navigationItem.titleView = label;
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
